package core.address.model.state;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import core.address.model.continent.Continent;
import core.address.model.country.Country;

@Entity
@Table(name="state")
public class State implements Serializable{
	
		private static final long serialVersionUID = -8767337896773261247L;
		private Long uuid;
		private String stateName ;
		private Country country ;
		private Continent continent ;
		private String abbreviation ;
		
		@Id
		@GeneratedValue
		@Column(name="uuid")
		public Long getUuid()
		{
			return uuid ;
		}
		@Column(name="statename")
		public String getStateName() 
		{
			return stateName;
		}
		@ManyToOne(cascade = CascadeType.ALL)
	    public Country getCountry() 
		{ 
		  return this.country; 
	    } 
		
		public void setUuid(Long uuid)
		{
			this.uuid = uuid;
		}
		public void setStateName(String stateName)
		{
			this.stateName = stateName ;
		}
		public void setCountry(Country country)
		{
			this.country = country ;
		}
		@ManyToOne(cascade = CascadeType.ALL)
		public Continent getContinent() {
			return continent;
		}
		public void setContinent(Continent continent) {
			this.continent = continent;
		}
		public String getAbbreviation() {
			return abbreviation;
		}
		public void setAbbreviation(String abbreviation) {
			this.abbreviation = abbreviation;
		}
}
